import yFree from './YFree/YFree.js'

export default {
    IFinal: {
        builderTitle: "本项目仅可用于学习使用，非作者本人同意，请勿传播或用做任何商业用途。感谢您的支持！",
        toastTitle: "欢迎使用YFree_Admin",
        aesPwd: "000000000000",
        Page: {
            index: "index",
            home: "home",
        },
        SaveKey: {
            menuModels_history: "menuModels_history",
        },
    },
    AppUtils: {
        userModel: "userModel",
        saveUserModel: function (userModel) {
            yFree.ySaveObj(this.userModel, userModel);
        },
        readUserModel: function () {
            let userModel = yFree.yReadObj(this.userModel);
            if (userModel == null) return null;
            if (new Date().getTime() - userModel.login_time > 1000 * 60 * 30) { // 最后登录时间超过30分钟
                this.deleteUserModel();
                return null;
            }
            return userModel;
        },
        deleteUserModel: function () {
            yFree.yDelete(this.userModel);
        },
    },
    IJkid: {
        login: "02A01", //登录
    },
};
